{template 'header'}
{template 'autoHeader','auto'}

<!--主体部分-->
<div class="layout960 fn-clear">
	<!--左 start-->
	<div class="auto-left fn-left">
		<!--图片筛选 start-->
		{if $searchSellModel || $searchStopModel}
		<div class="auto-gal-filter auto-bd">
			<div id="gal-filter-tab" class="gal-filter-hd">
				<ul class="fn-clear">
					{php $hasFirst=0}
					{if $searchSellModel}<li class="first {if $ModelOnShow!=2}selected{/if}">在售<span>({if $sellNum}{$sellNum}{else}0{/if}张图片)</span></li>{php $hasFirst=1}{/if}
					{if $searchStopModel}<li{if $ModelOnShow==2||!$hasFirst} class="selected"{/if}>停售<span>({if $stopNum}{$stopNum}{else}0{/if}张图片)</span></li>{/if}
				</ul>
			</div>
			<!--在售 start-->
			{php $hasFirst=0}
			{if $searchSellModel}
			{php $hasFirst=1}
			<div class="gal-filter-list content{if $ModelOnShow==2} fn-hide{/if}">
				<dl class="fn-clear">
					<dt>按车款：</dt>
					<dd>
						<ul>
							<li{if !isset($amid)||$amid==0||$ModelOnShow==2||$ModelOnShow==0} class="selected"{/if}><a href="{url('auto/pictureList', 'carid='.$carId)}">不限</a></li>
						</ul>
					</dd>
					<dd class="gal-filter-list-year">
						{loop $searchSellModel $year $type}
						<div class="fn-clear">
							{if $year}
							<div class="fn-left"><span>{$year}款 &nbsp;|</span></div>
							{else}
							<div class="fn-left"><span>未知年款 &nbsp;|</span></div>
							{/if}
							<ul class="fn-left fn-clear">
								{loop $type $amid2 $name}
								<li{if isset($amid)&&$amid==$amid2} class="selected"{/if}><a href="{url('auto/pictureList', 'modelid='.$amid2)}">{$name}</a></li>
								{/loop}
							</ul>
						</div>
						{/loop}
					</dd>
				</dl>
				<dl class="fn-clear">
					<dt>按种类：</dt>
					<dd>
						<ul>
							<li{if !isset($alid)||$alid==0} class="selected"{/if}><a href="{url('auto/pictureList', array('modelid='=>$modelid, 'carid'=> $carId))}">不限</a></li>
							{loop $searchType $typeId $typename}
							<li{if isset($alid)&&$alid==$typeId} class="selected"{/if}><a href="{url('auto/pictureList', array('modelid='=>$modelid, 'carid'=> $carId, 't'=> $typeId))}">{$typename}</a></li>
							{/loop}
						</ul>
					</dd>
				</dl>
			</div>
			{/if}
			<!--在售 end-->

			<!--停售 start-->
			{if $searchStopModel}
			<div class="gal-filter-list content{if $ModelOnShow!=2&&$hasFirst} fn-hide{/if}">
				<dl class="fn-clear">
					<dt>按车款：</dt>
					<dd>
						<ul>
							<li{if !isset($amid)||$amid==0||$ModelOnShow==1||$ModelOnShow==0} class="selected"{/if}><a href="{url('auto/pictureList', array( 'carid'=> $carId))}">不限</a></li>
						</ul>
					</dd>
					<dd class="gal-filter-list-year">
						{loop $searchStopModel $year $type}
						<div class="fn-clear">
							{if $year}
							<div class="fn-left"><span>{$year}款 &nbsp;|</span></div>
							{else}
							<div class="fn-left"><span>未知年款 &nbsp;|</span></div>
							{/if}

							<ul>
								{loop $type $amid2 $name}
								<li{if isset($amid)&&$amid==$amid2} class="selected"{/if}><a href="{url('auto/pictureList', array('modelid'=>$amid2))}">{$name}</a></li>
								{/loop}
							</ul>
						</div>
						{/loop}
					</dd>
				</dl>

				<dl class="fn-clear">
					<dt>按种类：</dt>
					<dd>
						<ul>
							<li{if !isset($alid)||$alid==0} class="selected"{/if}><a href="{url('auto/pictureList', array('modelid='=>$modelid, 'carid'=> $carId))}">不限</a></li>
							{loop $searchType $typeId $typename}
							<li{if isset($alid)&&$alid==$typeId} class="selected"{/if}><a href="{url('auto/pictureList', array('modelid='=>$modelid, 'carid'=> $carId, 't'=> $typeId))}">{$typename}</a></li>
							{/loop}
						</ul>
					</dd>
				</dl>
			</div>
			{/if}
			<!--停售 start-->
		</div>
		{/if}
		<!--图片筛选 end-->
		<!--图片 start-->
		<div class="auto-gallery auto-bd mt10">
			<div class="auto-hd">
				<h3>{$carInfo[name]} - 图片</h3>
				<!--<a class="more" href="#" target="_blank">更多>></a>-->
			</div>
			<div class="content">
				{if $AutoPicture}
				{php $decide=0}
				{loop $AutoPicture $picType}

				<!--外观 start-->
				{if $picType[num]!=0}
				{php $decide=1}
				<div class="auto-gallery-block bddot-bottom">
					<div class="gal-hd fn-clear">
						<h3>{$picType[name]}<span> （<a class="jsGo mr5" data-value="{$picType[arid]}" href="javascript:void(0);" onclick="return false">{$picType[num]}</a>张）</span></h3>
						<!--<a href="#" target="_blank">更多图片>></a>-->
					</div>
                    <script>
                        seajs.use(['$','lm-util'],function($,util){
                            $(".jsGo").click(function(){
                                var v = $(this).attr("data-value");
                                util.go('t',v);
                            });
                        })
                    </script>
					<ul class="fn-clear">
						{loop $picType[pics] $pic}
						<li>
							<a href="{url('auto/pictureShow', 'carid='.$carId.'&pictureId='.$pic['apid'])}" target="_blank">
								<img src="{Picture::thumb($pic['imgurl'],150,113)}" width="150" height="100" />
							</a>
							<a href="{url('auto/pictureShow', 'carid='.$carId.'&pictureId='.$pic['apid'])}" target="_blank">{$pic[title]}</a>
						</li>
						{/loop}
					</ul>
					{if isset($t)}
					{php $total = $items}
					{template 'pager', 'inc'}
					{/if}
				</div>
				{/if}
				{/loop}
				{if !$decide}
				<!--{template 'noauto', 'message'}-->
				{/if}
				<!--外观 end-->
				{/if}
			</div>
		</div>
		<!--图片 end-->
	</div>
	<!--左 end--><!--右 start-->
	<div class="auto-right fn-right">
		<!--其他车系 start-->
		{template 'part_CarRelation', 'auto'}
		<!--其他车系 end-->
		<!--网友还看过 start-->
		{template 'part_CarAttention', 'auto'}
		<!--网友还看过 end-->
		<!--品牌在售车系 start-->
		{template 'part_CarOnsale', 'auto'}
		<!--品牌在售车系 end-->
	</div>
	<!--右 end-->
</div>
<script type="text/javascript">
    seajs.use(['lm-util'],function(util){
        util.tab("mouseover","div#gal-filter-tab", "selected", "div.gal-filter-list");
    })
</script>
<!--主体部分 end-->
{template 'footer'}
<!--主体部分 end-->
